import Vue from 'vue'

let server = process.env.VUE_APP_RESTAURANTPCSERVICE;
let allByPageUrl = '/redbag/allByPage';
let addredbagUrl = '/redbag/addredbag';
let searchWithPageUrl = '/redbag/searchWithPage';

export default{
	allByPageService: function(paramsObj,callBack){
		Vue.axios.post(`${server}${allByPageUrl}`, paramsObj).then(res => {
			callBack(res.data);
		})
	},
	addredbagService: function(paramsObj,callBack){
		Vue.axios.post(`${server}${addredbagUrl}`, paramsObj).then(res => {
			callBack(res.data);
		})
	},
	searchWithPageService: function(paramsObj,params,callBack){
		Vue.axios.post(`${server}${searchWithPageUrl}`, paramsObj,{
			params: params
		}).then(res => {
			callBack(res.data);
		})
	},
}